package week8;

public class Bicycle extends Transport {
    private boolean isGear;

    public Bicycle(String name, int speed, boolean isGear) {
        super(name, speed);
        this.isGear = isGear;
    }

    public Bicycle() {

    }
    @Override
    public void moveWay(){
        System.out.println(super.getName()+isGear+"齿轮");
    }

    @Override
    public void showInfo(){
        System.out.println("交通工具:" + super.getName());
        moveWay();
        System.out.println(super.getName()+"速度是:" + super.getSpeed());
    }
}
